<!-- 顶部导航 -->
<style>
.nav {
	width: 961px;
	height: 40px;
	margin: 5px auto;
	/*导航背景色*/
	background: url(__IMG__/Home/default/nav-back.png) repeat-x #EEE;
}

.nav ul.nav_ul {
	height: 40px;
	margin-left: -1px;
}

.nav ul li.nav_li {
	float: left;
	height: 40px;
	width: auto;
	border-left: 1px solid #EEE;
}

.nav ul li.nav_li a {
	display: block;
	float: left;
	margin: 3px 14px 7px;
	_margin: 3px 7px 7px;
	margin:3px 10px 7px\0;
	height: 30px;
	line-height: 30px;
	font-weight:bold;
	color: #000;
	text-shadow: 1px 1px rgba(245,245,245,0.9);
}

.nav ul li.nav_current,.nav ul li.nav_module {
	/*当前选中的主导航*/
	background: url(__IMG__/Home/default/nav-hover.png) #d5dc9a center top repeat-x;
}

.nav ul li ul.sub_nav_ul {
	display: none;
	position: relative;
	margin-top: 40px;
	border: 1px solid #ccc;
	background:#ccc;
	z-index: 99999; /*保证最前端显示*/
}

.nav ul li.sub_nav_li {
	height: 35px;
	/*子导航背景*/
	background: url(__IMG__/Home/default/nav-sub.png) #999 center center repeat-x;
	text-align: center;
}

.nav ul li.sub_nav_li a {
	margin: 0;
	width: 100%;
	height: 35px;
	line-height: 35px;
}

.nav ul li.sub_nav_li:hover {
	/*子导航悬停*/
	background: url(__IMG__/Home/default/nav-sub-hover.png) #d5dc9a center center repeat-x ;
}
</style>

<script type="text/javascript">
	$(function() {
		$(".nav li.nav_li").hover(function() {
			var next = $(this).find(".sub_nav_ul");
			if (next.length > 0) {
				var width = $(this).width();
				next.show();
				var browser=$.browser;
				if(browser.msie&&parseInt(browser.version)<8){
					next.width(width-2);
					next.find("li").width(width-2);
				}
			} else {
				//$(this).addClass("nav_current");
			}
			$(this).addClass("nav_current");
		}, function() {
			$(".sub_nav_ul").hide();
			$(".nav li.nav_li").removeClass("nav_current");
		});
	})
</script>

<div class="nav">
	<ul class="nav_ul">
		<foreach name="modules.hierarchy" item="mod"> <!-- 可见内容 -->
		<if condition="$mod.seen eq 1">
		<li
			class="nav_li <if condition='$module and $module[id] eq $mod[id]'>nav_module</if>">
			<a
			href="<empty name='mod.url'><if condition='$mod.module_leaf eq 1'>__APP__/mod/{$mod.id}<else/>javascript:void(0)</if><else/>{$mod.url}</empty>">{$mod.name}</a>
			<notempty name="mod.next"> <!-- 只允许显示两层 -->
			<ul class="sub_nav_ul">
				<foreach name="mod.next" item="m"> <if
					condition="$m.seen eq 1">
				<li class="sub_nav_li"><a
					href="<empty name='m.url'>__APP__/mod/{$m.id}<else/>{$m.url}</empty>">{$m.name}</a>
				</li>
				</if> </foreach>
			</ul>
			</notempty>
		</li>
		</if> 
		</foreach>
	</ul>
</div>
